import React, { Component } from 'react'
import { HashRouter as Router, Route } from "react-router-dom";
import TabBar from '../components/tabbar/TabBar'
import Index from '../components/index/Index'
import Shopping from '../components/shoppingMall/ShoppingMall'
import Live from "../components/live/Live"
import My from '../components/my/My'
import DownloadApp from '../page/downloadApp/DownloadApp'
import SearchContent from '../page/searchContent/SearchContent'
import Category from '../page/category/Category'
import Chat from '../page/chat/Chat'
import Detailss from "../page/lia1/Searchdetails"
import WeChat from '../page/weChat/weChat'
import Xiazai1 from '../page/downloadApp/DownloadPage1'
import Xiazai2 from '../page/downloadApp/DownloadPage2'
import Login from '../page/login/login'
import UserPass from '../page/login/UserPass'
import Forget from '../page/login/forget'
import Register from '../page/register/register'
import SwiperDetails from '../components/swiperDetails/SwiperDetails'
import NewShare from '../page/newShare/NewShare'
import NavListDetails from '../components/navListDetails/NavListDetails'
import Details from '../page/newDetail/NewDetail'
import MallNavTop from "../page/mallNavTop/MallNavTop"
import NewProduct from "../page/newProduct/NewProduct"
import GrabToday from "../page/grabToday/GrabToday"
import MallNavList from "../page/mallNavList/MallNavList"
import GrabTabBar from "../page/grabToday/grabTabBar/GrabTabBar"
import Sale from "../page/grabToday/sale/Sale"
import MyGrab from "../page/grabToday/myGrab/MyGrab"
// 引入购物车
import Cart from '../page/cart/cart'
import FallsDetailts from '../components/fallsDetailts/fallsDetailts'
export default class Routerconfig extends Component {
    render() {
        return (
            <Router>
                {/* 首页开始 */}
                <Route exact path='/' render={(props) => <TabBar><Index {...props}></Index></TabBar>}></Route>
                {/* 首页结束 */}
                {/* 轮播图详情页 */}
                <Route exact path='/swiperdetails' render={() => <SwiperDetails></SwiperDetails>}></Route>
                {/* 轮播图详情页面结束 */}
                {/* 新人分享页面开始 */}
                <Route exact path='/newshare' render={(props) => <NewShare {...props}></NewShare>}></Route>
                {/* 新人分享结束 */}
                {/*购物车 */}
                <Route exact path='/my/cart' render={(props) => <Cart {...props}></Cart>}></Route>
                {/* 购物车结束 */}
                {/* 商品详情页面开始 */}
                <Route exact path='/details/:id' render={(props) => <Details {...props}></Details>}></Route>
                {/* 商品详情页面结束 */}
                {/* 首页列表详情页开始 */}
                <Route exact path='/navlistdetails/:id' render={(props) => <NavListDetails {...props}></NavListDetails>}></Route>
                {/* 首页列表详情页结束 */}
                 {/* 首页视频详情页开始 */}
                 <Route exact path='/fallsDetailts/:UserId' render={(props) => <FallsDetailts {...props}></FallsDetailts>}></Route>
                {/* 首页视频详情页结束 */}
                {/* 商城开始 */}
                <Route exact path='/shopping' render={(props) => <TabBar><Shopping {...props}></Shopping></TabBar>}></Route>
                {/* 商城结束 */}
                {/* 商城限时快抢开始 */}
                <Route exact path='/grabTabBar' render={(props) => <GrabTabBar><GrabTabBar {...props}></GrabTabBar></GrabTabBar>}></Route>
                {/* 商城限时快抢结束 */}
                {/* 商城即将售罄开始 */}
                <Route exact path='/sale' render={(props) => <GrabTabBar><Sale {...props}></Sale></GrabTabBar>}></Route>
                {/* 商城即将售罄结束 */}
                {/* 商城我的快抢开始 */}
                <Route exact path='/myGrab' render={(props) => <GrabTabBar><MyGrab {...props}></MyGrab></GrabTabBar>}></Route>
                {/* 商城我的快抢结束 */}
                {/* 商品顶部导航页面限时快抢开始 */}
                <Route exact path='/grabToday' render={(props) => <GrabToday {...props}></GrabToday>}></Route>
                {/* 商品顶部导航页面限时快抢结束 */}
                {/* 商品顶部导航页面热销榜单开始 */}
                <Route exact path='/mallNavTop/:id' render={(props) => <MallNavTop {...props}></MallNavTop>}></Route>
                {/* 商品顶部导航页面热销榜单结束 */}
                {/* 商品顶部导航页面新品快抢开始 */}
                <Route exact path='/newProduct/:id' render={(props) => <NewProduct {...props}></NewProduct>}></Route>
                {/* 商品顶部导航页面新品快抢结束 */}
                {/* 商品导航列表页面开始 */}
                <Route exact path='/mallNavList/:id' render={(props) => <MallNavList {...props}></MallNavList>}></Route>
                {/* 商品导航列表页面结束 */}
                {/* 直播开始 */}
                <Route exact path='/live' render={() => <TabBar><Live></Live></TabBar>}></Route>
                {/* 直播结束 */}
                {/* 我的开始 */}
                <Route exact path='/my' render={(props) => <TabBar><My {...props}></My></TabBar>}></Route>
                {/* 我的结束 */}
                {/* 下载APP开始 */}
                <Route exact path='/download' render={(props) => <DownloadApp {...props}></DownloadApp>}></Route>
                {/* 下载APP结束 */}
                <Route exact path='/download1' render={(props) => <Xiazai1 {...props}></Xiazai1>}></Route>
                <Route exact path='/download2' render={(props) => <Xiazai2 {...props}></Xiazai2>}></Route>
                {/* 下载页面结束 */}
                {/* 搜索页面开始 */}
                <Route exact path='/search' render={(props) => <SearchContent {...props}></SearchContent>}></Route>
                {/* 搜索页面结束 */}
                {/* 搜索详情页面开始 */}
                <Route exact path='/detailss' render={(props) => <Detailss {...props}></Detailss>}></Route>
                {/* 搜索详情页面结束 */}
                {/* 分类页面开始 */}
                <Route exact path='/category' render={(props) => <Category {...props}></Category>}></Route>
                {/* 分类页面结束 */}
                {/* 客服聊天页面开始 */}
                <Route exact path='/chat' render={(props) => <Chat {...props}></Chat>}></Route>
                {/* 客服聊天页面结束 */}
                {/* 客服聊天子页面开始 */}
                <Route exact path='/weChat/:chatId' render={(props) => <WeChat {...props}></WeChat>}></Route>
                {/* 客服聊天子页面结束 */}
                {/* 选择登录页面开始 */}
                <Route exact path='/login' render={(props) => <Login {...props}></Login>}></Route>
                {/* 选择登陆页面结束 */}
                {/* 账户密码登陆开始 */}
                <Route exact path='/userpass' render={(props) => <UserPass {...props}></UserPass>}></Route>
                {/* 账户密码登陆结束 */}
                {/* 忘记密码开始 */}
                <Route exact path='/forget' render={(props) => <Forget {...props}></Forget>}></Route>
                {/* 忘记密码结束 */}
                {/* 注册开始 */}
                <Route exact path='/register' render={(props) => <Register {...props}></Register>}></Route>
                {/* 注册结束 */}

            </Router>
        )
    }
}
